package com.test.deencredit.config_deencredit;

import android.text.TextUtils;

public class CountryConfig_deencredit {

    //国家区号
    public static final String AreaCode_Kenya = "+254";
    public static final String AreaCode_Ghana = "+233";
    public static final String AreaCode_Cote = "+225";
    public static final String AreaCode_Uganda = "+256";
    public static final String AreaCode_Cameroon = "+237";
    public static final String AreaCode_Zambia = "+260";
    public static final String AreaCode_Senegal = "+221";
    public static final String AreaCode_Tanzan = "+255";

    private static class Inner_deencredit {
        private static final CountryConfig_deencredit instance_deencredit = new CountryConfig_deencredit();
    }

    private CountryConfig_deencredit() {}

    public static CountryConfig_deencredit getInstance_deencredit() {
        return Inner_deencredit.instance_deencredit;
    }

    private String front;
    private String areaCode;

    public String getFront_deencredit() {
        if (TextUtils.isEmpty(front)) return "";
        return front;
    }

    public boolean isFrontEmpty_deencredit(){
        return TextUtils.isEmpty(front) || front.length()<=1;
    }

    public void setFront_deencredit(String front) {
        this.front = "/"+ front;
    }

    public String getCommonPath_deencredit(){
        if (TextUtils.isEmpty(front)) return "";
        return Paths_deencredit.BasePath_deencredit + getFront_deencredit()+ Paths_deencredit.CommonPath_deencredit;
    }

    public void setAreaCode_deencredit(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaCode_deencredit() {
        if (TextUtils.isEmpty(areaCode)) return "";
        if (areaCode.startsWith("+")) return areaCode;
        return "+"+areaCode;
    }

    public boolean isGhana_deencredit(){
        return AreaCode_Ghana.endsWith(getAreaCode_deencredit());
    }

    public boolean isCote_deencredit(){
        return AreaCode_Cote.endsWith(getAreaCode_deencredit());
    }

    public boolean isKenya_deencredit(){
        return AreaCode_Kenya.endsWith(getAreaCode_deencredit());
    }

    public boolean isUganda_deencredit(){
        return AreaCode_Uganda.endsWith(getAreaCode_deencredit());
    }

    public boolean isCameroon_deencredit(){
        return AreaCode_Cameroon.endsWith(getAreaCode_deencredit());
    }

    public boolean isZambia_deencredit(){
        return AreaCode_Zambia.endsWith(getAreaCode_deencredit());
    }

    public boolean isSenegal_deencredit(){
        return AreaCode_Senegal.endsWith(getAreaCode_deencredit());
    }

    public boolean isTanzan_deencredit(){
        return AreaCode_Tanzan.endsWith(getAreaCode_deencredit());
    }

    public boolean isEnglish_deencredit(){
        return isKenya_deencredit()|| isGhana_deencredit()|| isUganda_deencredit()|| isZambia_deencredit();
    }

    public boolean isFrench_deencredit(){
        return isCote_deencredit()|| isCameroon_deencredit()|| isSenegal_deencredit();
    }

    public boolean isGetOrderRepayH5_deencredit(){
        return isUganda_deencredit()|| isKenya_deencredit();
    }

    public boolean isOrderRepayH5_deencredit(){
        return !isGetOrderRepayH5_deencredit();
    }
    
}
